<!---
	Title:		EPAR1.1 
	Author:		Bruce Frick
	Purpose:	Step3 Conformation 3 page.  This page submition is handled by javascript.  A javascript loop POST's each beneficary to the server (api.cfm).
				After the last beneficary is inserted, javascript will move the brower to the next page, emergency contacts.
--->

<cfset BASE = CreateObject("component", "cfc.base") / >
<cfset baseQueries = CreateObject("component", "#session.rootDir#.cfc.queries") />

<cfoutput>
<!---HTML header, css links, js links, and page title--->
#BASE.htmlHeader(
	"/jquery/ui-1.8.5/jquery-ui.min.js,/jquery/plugins/scrollTo/jquery.scrollTo-1.4.2-min.js,js/Step3-Orientation3.js", <!---JS links--->
    "/jquery/ui-1.8.5/themes/cupertino/jquery-ui.css", <!---CSS links--->
    "Step 3:  HR - Orientation 3", <!---Page Title--->
    "Status" <!---Active Nav Link--->
)#
<!---HTML header, css links, js links, and page title--->

    
<cfif Session.bolAuth EQ True and (Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR)>
    
    <!---Query objects--->
    <cfset QUERIES = {} />
    <cfset QUERIES.GetEmpInfo = baseQueries.funcGetEmpInfo(URL.StepID) />
    <cfset QUERIES.GetDepts = baseQueries.funcGetDepts() /> 
    <!---check for noshow and offer declined people--->
    <Cfif QUERIES.GetEmpInfo.PositionID NEQ "">
    	<cfset QUERIES.GetPositionInfo = baseQueries.funcGetPositionCodes( QUERIES.GetEmpInfo.PositionID ) />
    <cfelse>
    	<cfset QUERIES.GetPositionInfo = -1 />
    </Cfif>
    <cfset QUERIES.GetStates = baseQueries.funcGetStates() />
    <cfset QUERIES.GetPhoneTypes = baseQueries.funcGetPhoneTypes() />
    <cfset QUERIES.GetRelations = baseQueries.funcGetRelations() />
    <!---Query objects--->
    
    <cfif QUERIES.GetEmpInfo.recordcount GT 0>
		<h1 class="title">Step 3:  HR - Orientation - Beneficaries</h1>
        <div class="entry">
        
            EPLS Exclusion List Test - Passed. <BR />
            On this page we'll capture additional information obtained by 
            HR from the employee during Orientation, specifically 
            Beneficaries.    
            
            <cfform name="frmStep3" method="post">
                <table cellpadding="0" cellspacing="0" width='100%'>
                    <tr>
                        <td>Employee:</td>
                        <td>#QUERIES.GetEmpInfo.First# (#QUERIES.GetEmpInfo.PreferredName#) #QUERIES.GetEmpInfo.Last#</td>
                    </tr>
                    <tr>
                        <td>Position:</td>
                        <td>#QUERIES.GetPositionInfo.PositionCodeDescription# ( #QUERIES.GetPositionInfo.PositionCode# )</td>
                    </tr>
                    <tr>
                        <td>Department:</td>
                        <td>#QUERIES.GetDepts.Org#</td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <fieldset>
                                <legend>Beneficiaries</legend>
                                <table id="Beneficiaries" width="100%">
                                    <tr>                                 
                                        <td width="100%" id="beneficiary_body">
                                            <table>
                                                <tr>
                                                    <td width='10'>&nbsp;</td>
                                                    <td nowrap='nowrap'>First &amp; Last Name: </td>                                                   
                                                    <td width='100%'>                                                            
                                                        <input name="First" id="First" maxlength="25" type="text" error_message='Please provide a First Name.'> 
                                                        <input name="Last" id="Last" maxlength="25" type="text"  error_message='Please provide a Last Name.'>                                                 
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width='10'>&nbsp;</td>
                                                    <td valign='top'>Address:</td>
                                                    <td>														
                                                        <input name="Address1" id="Address1" maxlength="50" style="width: 98%;margin-bottom:3px" type="text"><br />
                                                        <input name="Address2" id="Address2" maxlength="50" style="width: 98%;" type="text">                                                 
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width='10'>&nbsp;</td>
                                                    <td nowrap='nowrap'>City, ST, ZIP:</td>
                                                    <td nowrap="nowrap">
    
                                                        <input name="City" id="City" style="width: 50%;" type="text"> 
                                                        <select name="State" id="State">
                                                            <cfloop query="QUERIES.GetStates">
                                                                <option value="#LocalCodeIdNo#" >#LocalCodeAbbreviation#</option>
                                                            </cfloop>
                                                        </select> 
                                                        <input name="Zip" id="Zip" maxlength="10" size="14" type="text"> 
                                                
                                                    </td>
                                                </tr>
                                               <TR>
                                                    <td width='10'>&nbsp; </td>
                                                    <TD nowrap=nowrap valign="top">Phones:</TD>
                                                    <TD colspan=3>
                                                        <fieldset style="border:inset">
                                                            <table>
                                                            	<TR>
                                                                    <td width =10>&nbsp;</td>
                                                                    <TD>Primary:&nbsp;</TD>
                                                                    <td>																		                                                                	
                                                                        <select name="PhonePrimaryID" id="PhonePrimaryID">
                                                                            <cfloop query="QUERIES.GetPhoneTypes">
                                                                                <option value="#TypeCodeIdNo#" >#TypeCode#</option>
                                                                            </cfloop>
                                                                        </select> 
                                                                    </td>
                                                                </TR>
                                                                <tr>
                                                                    <td width =10>&nbsp;</td>
                                                                    <td nowrap=nowrap>Home Phone:</td>
                                                                    <td>
                                                                        <input type="text" maxlength="14" id="HomePhone" name="HomePhone" error_message="The valid home phone format is xxx-xxx-xxxx.">
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td width =10>&nbsp;</td>
                                                                    <td nowrap=nowrap>Cell Phone:</td>
                                                                    <td>
                                                                        <input type="text" maxlength="14" id="CellPhone" name="CellPhone" error_message="The valid cell phone format is xxx-xxx-xxxx.">
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td width =10>&nbsp;</td>
                                                                    <td nowrap=nowrap>Work Phone:</td>
                                                                    <td>
                                                                        <input type="text" maxlength="14" id="WorkPhone" name="WorkPhone" error_message="The valid work phone format is xxx-xxx-xxxx.">
                                                                        x
                                                                        <input type="text" size="7" maxlength="6" id="WorkPhoneExt" name="WorkPhoneExt">	
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </fieldset>
                                                    </TD>
                                                </TR>
                                                <tr>
                                                    <td width =10>&nbsp;</td>                    
                                                    <td>Contact Email:</td>
                                                    <td>
                                                        <input type="text" style="width: 98%;" maxlength="50" id="Email" name="Email">
                                                    </td>
                                                </tr>
                                                <TR>
                                                    <td width =10>&nbsp;</td>
                                                    <TD nowrap=nowrap>Relation:</TD>
                                                    <TD colspan=3>
                                                        <select id="RelationID" name="RelationID">
                                                            <cfloop query="QUERIES.GetRelations">
                                                                <option value="#RelationCodeIDNo#">#RelationCode#</option>
                                                            </cfloop>
                                                        </select>
                                                    </TD>
                                                </TR>
                                            </table>
                                        </td>
                                    </tr>                
                                </table>     
                            </fieldset>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="5" align="right">
                            <a href="##" class="tablemod" id="more_beneficiaries" >CLICK HERE to add another Beneficiary</a>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="5" align="right" valign="middle" style="padding-top:5px;">
                            <cfinput type="hidden" name="EmpID" value="#QUERIES.GetEmpInfo.ID#">
                            <cfinput type="hidden" name="StepID" value="#URL.StepID#">
                            <cfinput type="button" name="Skip" value="Skip >>">
                            <cfinput type="button" name="Submit" value="Next >>" >
                        </td>
                    </tr>
                </table>
            </cfform>
            
            <table id="protoHTML" style="display:none">
                <tr>                                 
                    <td width="100%" >
                        <table>
                            <tr>
                                <td width='10'>&nbsp;</td>
                                <td nowrap='nowrap'>First &amp; Last Name: </td>                                                   
                                <td width='100%'>                                                            
                                    <input name="First" id="First" maxlength="25" type="text" error_message='Please provide a First Name.'> 
                                    <input name="Last" id="Last" maxlength="25" type="text" error_message='Please provide a Last Name.'>                                                 
                                </td>
                            </tr>
                            <tr>
                                <td width='10'>&nbsp;</td>
                                <td valign='top'>Address:</td>
                                <td>														
                                    <input name="Address1" id="Address1" maxlength="50" style="width: 98%;margin-bottom:3px" type="text"><br />
                                    <input name="Address2" id="Address2" maxlength="50" style="width: 98%;" type="text">                                                 
                                </td>
                            </tr>
                            <tr>
                                <td width='10'>&nbsp;</td>
                                <td nowrap='nowrap'>City, ST, ZIP:</td>
                                <td nowrap="nowrap">
                
                                    <input name="City" id="City" style="width: 50%;" type="text"> 
                                    <select name="State" id="State">
                                        <cfloop query="QUERIES.GetStates">
                                            <option value="#LocalCodeIdNo#" >#LocalCodeAbbreviation#</option>
                                        </cfloop>
                                    </select> 
                                    <input name="Zip" id="Zip" maxlength="10" size="14" type="text"> 
                            
                                </td>
                            </tr>
                           <TR>
                                <td width='10'>&nbsp; </td>
                                <TD nowrap=nowrap valign="top">Phones:</TD>
                                <TD colspan=3>
                                    <fieldset style="border:inset">
                                        <table>
                                            <TR>
                                                <td width =10>&nbsp;</td>
                                                <TD>Primary:&nbsp;</TD>
                                                <td>																		                                                                	
                                                    <select name="PhonePrimaryID" id="PhonePrimaryID">
                                                        <cfloop query="QUERIES.GetPhoneTypes">
                                                            <option value="#TypeCodeIdNo#" >#TypeCode#</option>
                                                        </cfloop>
                                                    </select> 
                                                </td>
                                            </TR>
                                            <tr>
                                                <td width =10>&nbsp;</td>
                                                <td nowrap=nowrap>Home Phone:</td>
                                                <td>
                                                    <input type="text" maxlength="14" id="HomePhone" name="HomePhone" error_message="The valid home phone format is xxx-xxx-xxxx.">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width =10>&nbsp;</td>
                                                <td nowrap=nowrap>Cell Phone:</td>
                                                <td>
                                                    <input type="text" maxlength="14" id="CellPhone" name="CellPhone" error_message="The valid cell phone format is xxx-xxx-xxxx.">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width =10>&nbsp;</td>
                                                <td nowrap=nowrap>Work Phone:</td>
                                                <td>
                                                    <input type="text" maxlength="14" id="WorkPhone" name="WorkPhone" error_message="The valid work phone format is xxx-xxx-xxxx.">
                                                    x
                                                    <input type="text" size="7" maxlength="6" id="WorkPhoneExt" name="WorkPhoneExt">	
                                                </td>
                                            </tr>
                                        </table>
                                    </fieldset>
                                </TD>
                            </TR>
                            <tr>
                                <td width =10>&nbsp;</td>                    
                                <td>Contact Email:</td>
                                <td>
                                    <input type="text" style="width: 98%;" maxlength="50" id="Email" name="Email" />
                                </td>
                            </tr>
                            <TR>
                                <td width =10>&nbsp;</td>
                                <TD nowrap=nowrap>Relation:</TD>
                                <TD colspan=3>
                                    <select id="RelationID" name="RelationID">
                                        <cfloop query="QUERIES.GetRelations">
                                            <option value="#RelationCodeIDNo#">#RelationCode#</option>
                                        </cfloop>
                                    </select>
                                </TD>
                            </TR>
                        </table>
                    </td>
                </tr>
            </table>            
            
        </div>
        
    
    <cfelse>
    
        This employee has already been processed in Step 3.   To select another user, click <a href="Step3-Orientation1.cfm">Here</a>
        
    </cfif>


<cfelse>
    <cfinclude template="denied.cfm">
</cfif>
    

<!---HTML footer, closes html and body tags.  Any footer info goes here--->
#BASE.htmlFooter()#
<!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>